<?php
include_once("../include/init.php");
extract($_POST);
//判断是否从表单提交
	if(!isset($_POST)){
		msg('请从表单提交','user.php');
		exit();
	}
	//数据处理
	$uid = $_SESSION['uid'];
	$user = trim($user);
	$email = trim($email);
	$phone = trim($tel);
	//数据库修改
$sql = " UPDATE tk_user set user = '$user',email ='$email',phone='$phone' where uid =$uid";
mysql_query($sql);
if(mysql_affected_rows()>0){
	msg("修改成功！","login.php");
}else{
	msg("修改失败！","user.php");
}
?>